package view.common.struts;

import java.util.List;
import java.util.Map;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.ValidatorForm;
import org.apache.struts.upload.FormFile;

/**
 * @Archivo CustomActionForm.java
 * @Fecha                @Autor   @Cambios
 * 21/01/2011 02:35:53 PM       moshiro
 */
public class CustomActionForm extends ValidatorForm {
    
    private Object bean;
    private Object beanDetail;
    private List beanList;
    private List beanDetailList;
    private List beanDetailList2;
    private FormFile formFile;
    private List formFileList;
    private Map mapList;
    private String readOnly;
    private String[] selectedList;
    private String selectedIndex;
    private String selectedIndex2;
    
    private Object beanSearch;
    private Object beanSearchDetail;
    private String queryString;
    private String queryString2;
    private String queryString3;
        
    /** Creates a new instance of GenericForm */
    public CustomActionForm() {
        super();
    }

    public Object getBean() {
        return bean;
    }

    public void setBean(Object bean) {
        this.bean = bean;
    }

    public List getBeanList() {
        return beanList;
    }

    public void setBeanList(List beanList) {
        this.beanList = beanList;
    }

    public FormFile getFormFile() {
        return formFile;
    }

    public void setFormFile(FormFile formFile) {
        this.formFile = formFile;
    }

    public List getFormFileList() {
        return formFileList;
    }

    public void setFormFileList(List formFileList) {
        this.formFileList = formFileList;
    }

    public Map getMapList() {
        return mapList;
    }

    public void setMapList(Map mapList) {
        this.mapList = mapList;
    }

    public String getReadOnly() {
        return readOnly;
    }

    public void setReadOnly(String readOnly) {
        this.readOnly = readOnly;
    }

    public String getSelectedIndex() {
        return selectedIndex;
    }

    public void setSelectedIndex(String selectedIndex) {
        this.selectedIndex = selectedIndex;
    }

    public String[] getSelectedList() {
        return selectedList;
    }

    public void setSelectedList(String[] selectedList) {
        this.selectedList = selectedList;
    }

    public Object getBeanSearch() {
        return beanSearch;
    }

    public void setBeanSearch(Object beanSearch) {
        this.beanSearch = beanSearch;
    }

    public String getQueryString() {
        return queryString;
    }

    public void setQueryString(String queryString) {
        this.queryString = queryString;
    }

    public String getQueryString2() {
        return queryString2;
    }

    public void setQueryString2(String queryString2) {
        this.queryString2 = queryString2;
    }

    public String getQueryString3() {
        return queryString3;
    }

    public void setQueryString3(String queryString3) {
        this.queryString3 = queryString3;
    }

    public Object getBeanDetail() {
        return beanDetail;
    }

    public void setBeanDetail(Object beanDetail) {
        this.beanDetail = beanDetail;
    }

    public List getBeanDetailList() {
        return beanDetailList;
    }

    public void setBeanDetailList(List beanDetailList) {
        this.beanDetailList = beanDetailList;
    }

    public Object getBeanSearchDetail() {
        return beanSearchDetail;
    }

    public void setBeanSearchDetail(Object beanSearchDetail) {
        this.beanSearchDetail = beanSearchDetail;
    }

    public List getBeanDetailList2() {
        return beanDetailList2;
    }

    public void setBeanDetailList2(List beanDetailList2) {
        this.beanDetailList2 = beanDetailList2;
    }

    public String getSelectedIndex2() {
        return selectedIndex2;
    }

    public void setSelectedIndex2(String selectedIndex2) {
        this.selectedIndex2 = selectedIndex2;
    }
    
    public ActionErrors validate(ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
    {        
        if( request.getParameter(mapping.getParameter())==null ) { 
            return new ActionErrors(); 
        } 
        return super.validate( mapping, request ); 
    }
    
   
}
